package com.blades;

import com.blades.monitor.BusinessMonitor;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by shuangjun.yang on 2016/3/17.
 * 监控操作类
 */
public class BladesMonitor {

    private static BusinessMonitor businessMonitor = BusinessMonitor.getInstance();

    public static void addMonitor(String name,Long count){
        businessMonitor.recordCount(name, count);
    }

    public static void addMonitor(String name,Long count,Double time){
        businessMonitor.recordCountTime(name, count, time);
    }

    public static Map<String,Number> getMonitorData(){
        Map<String,Number> map = new HashMap<String,Number>();
        businessMonitor.getBusinessMonitorDataMap(map);
        return map;
    }
}
